Dependencies
WOLF has the following dependencies:
Mandatory: CMake, Eigen, yaml-cpp, yaml-schema-cpp and spdlog.
Optional, recommended: SuiteSparse and Ceres.
Optional: Boost.
The optional dependencies are detected automatically when WOLF is configured with CMake, and the CMake output reports which ones were found.
CMake
Building tool used by WOLF and by some of its dependencies. In order to
install cmake please follow the instructions at cmake
site. WOLF requires >= CMake-3.18
which can usually be installed via repository.
Eigen
Eigen is a linear algebra, header library.
WOLF requires Eigen >= 3.3.7. We recommend to install it via apt.
sudo apt install libeigen3-dev
yaml-cpp
WOLF uses YAML files for configuration and for saving and loading workspaces. Minimum version required is 0.7.
From ubuntu 22.04, it can be installed via apt:
sudo apt install libyaml-cpp-dev
In previous ubuntu distributions, it has to be installed via source.
yaml-schema-cpp
yaml-schema-cpp is a library for specifying and checking the structure, entries and types of YAML files.
To install it:
git clone -b main --depth 1 https://github.com/joanvallve/yaml-schema-cpp.git
cd yaml-schema-cpp
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
make
sudo make install
Note
To install it in a local folder without sudo, see local installation.
spdlog
WOLF uses spdlog library for logging. Minimum version required is v1.0.0. It can be installed via apt:
sudo apt install libspdlog-dev
SuiteSparse (optional, recommended)
SuiteSparse is a collection of sparse matrix libraries.
WOLF uses two of them in SolverEigen, the solver of WOLF core that does not depend on Ceres (see next section):
CHOLMOD (supernodal sparse Cholesky) for
linear_solver: cholesky.SPQR (multifrontal sparse QR) for
linear_solver: qr.
Without SuiteSparse, SolverEigen uses Eigen’s built-in sparse solvers (SimplicialLDLT and SparseQR).
They give the same results but are much slower for large problems, especially the QR, which can be orders of
magnitude slower. Ceres also uses SuiteSparse if it is installed before compiling Ceres.
It can be installed via apt:
sudo apt install libsuitesparse-dev
When configuring WOLF, CMake reports whether it was found:
-- SuiteSparse found: SolverEigen will use SPQR and CHOLMOD
Note
Both SuiteSparse 7 or newer (which provides CMake configuration files) and older versions (e.g. the one of ubuntu 22.04) are supported.
Ceres (optional, recommended)
Ceres is an optimization library. If it is found, WOLF core includes the solver
SolverCeres. Otherwise, SolverEigen is the only solver available.
We recommend installing it:
SolverCeresprovides trust-region methods (e.g. Levenberg-Marquardt) and many more options thanSolverEigen. It can be selected in any configuration file (type: SolverCeres).The tests of
SolverCeresand its comparison withSolverEigenindemo_solvers_comparisonare only built if Ceres was found.
All Ceres dependencies can be installed via apt. They include SuiteSparse, which Ceres uses if it is installed before compiling Ceres:
sudo apt install libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev
Ceres 2.2 can be installed:
wget http://ceres-solver.org/ceres-solver-2.2.0.tar.gz
tar zxf ceres-solver-2.2.0.tar.gz
rm ceres-solver-2.2.0.tar.gz
mkdir ceres-bin
cd ceres-bin
cmake ../ceres-solver-2.2.0
make
make test
sudo make install
When configuring WOLF, CMake reports whether it was found:
-- Ceres 2.2.0 found: SolverCeres will be built
-- Ceres not found: SolverCeres will not be built (only SolverEigen)
To build WOLF without Ceres even if it is installed, add -DCMAKE_DISABLE_FIND_PACKAGE_Ceres=ON to the cmake
command.
Boost (optional)
Boost 1.73 or higher is an optional dependency. If found, the macro Macros for processors is fully operative.